package dk.marten.autodoodle;

import android.app.Activity;
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.graphics.Color;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.Window;
import android.view.WindowManager;
import android.widget.LinearLayout;

public class HelpPage extends Activity {
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		Log.d("HelpPage","onCreate");
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
		requestWindowFeature(Window.FEATURE_NO_TITLE);

		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		
		
		setContentView(R.layout.help);
		
		SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); 
		
		//SharedPreferences sharedPreferences = getPreferences(MODE_PRIVATE);
        float currentHue = sharedPreferences.getFloat("CurrentHue", 10f);

		Log.d("HelpPage","currentHue: "+currentHue);
        float[] farve = new float[]{currentHue,1,0.55f};
        LinearLayout layout = (LinearLayout) findViewById(R.id.helpLayout);
        layout.setBackgroundColor(Color.HSVToColor(farve));
		
	}
}
